/**
 * @fileoverview
 * This file is intended as a test-script for the jsmeter-plugin. In no
 * way should the code in this file be considdered usable, it is mainly
 * syntactically correct and complexity in a compact form.
 * The comments and documentation are fictional and seemingly fit the
 * actual code.
 * It's important to not that a 'fileoverview' will be counted towards
 * the comments of the first method that follows...
 * 
 * @author Martin 'Windgazer' Reurings, http://www.windgazer.nl/
 */

/**
 * This method should be 'reasonably' complex but not out of proportion.
 * 
 * @param {Object} simple An Object to be tested against.
 */
function moreSimplicity(/** Object */simple) {
	//Test to see if 'simple' is provided and 'true'.
	if (simple) {
		return true;
	} else {
		return false;
	}
}

/**
 * This method is overly complex and aimed to create a warning when
 * this file gets tested for complexity. The code doesn't actually
 * do anything sensible, the 'if'-statements and 'return'-statements
 * are simple complexity increasing factors.
 * 
 * @param {Complex} simple An Object with a 'notsobad' property of type int and boolean 'overthetop'.
 */
function moreComplexity(complex) {
	//Complexity in its' most compact and unredable form ;)
	var tooComplex = complex?complex.overthetop?true:false:false;
	if (!tooComplex && complex.notsobad) {
		if (complex.notsobad > 1) {
			//For every return statement the complexity increases...
			return "Not sure how many branches I can make";
		} else if (complex.notsobad < 0) {
			//Some if then else if... lovely complexity.
			if (complex.notsobad == -1) {
				return "Perhaps I'm there?";
			} else if (complex.notsobad < -5) {
				return "I really hope this'll do...";
			} else {
				return "One more for the road...";
			}
		} else {
			return "And to finish it of...";
		}
	}
	//This is the end of this test-file, let's hope the toolset works...
	return "The end!";
}